<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Item List</title>

    <style>
        html {
            margin: 0;
            padding: 0;
            height: 100%;
            background: url('img/background.png') no-repeat center center;
            background-size: 95%;
            background-color: #000;
            background-attachment: fixed;
            image-rendering: pixelated;
        }

        body {
            margin: 0;
            padding: 0;
            min-height: 100%;
        }

        #top {
            height: 50px;
            width: 100%;
            background-color: #000;
            display: flex;
            align-items: center; /* 垂直居中 */
            justify-content: space-between; /* 左右两端对齐 */
            padding: 0 10px;
            box-sizing: border-box;
        }

        #loge {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        #loge img {
            height: 40px;
            width: 40px;
            image-rendering: pixelated;
        }

        #loge p {
            color: #d1d1d1;
            font-size: 20px;
            margin: 0;
        }

        #login {
            height: 50px;
            display: flex;
            flex-direction: row;
            align-items: center;
        }

        #login p {
            color: #d1d1d1;
            font-size: 16px;
            margin: 0;
            user-select: none;
        }

        .operaButton {
            height: 30px;
            padding: 0 12px;
            background-color: #3a3a3a;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.2s ease;
            box-sizing: border-box;
        }

        .operaButton:hover {
            background-color: #505050;
        }

        #content {
            margin: 0 auto;
            width: 75%;
            min-height: calc(100vh - 50px);
            background-color: #2c2925;
        }
    </style>
</head>
<body>
    <div id="top">
        <div id="loge">
            <img src="img/site_avatar_isaac_l.webp" alt="Isaac Wiki">
            <p>以撒的结合Wiki</p>
        </div>
        <div id="login">
            <!-- 预留登录/注册区域 -->
        </div>
    </div>
    <div id="content">
    </div>
</body>

<script src="js/jQuery-3.7.1.min.js"></script>
<script>
    $(document).ready(function () {

        if (localStorage.getItem("jwtToken")) {

        } else {
            $("#login").html(
                '<div id="loginBtn" class="operaButton">' +
                '<p>登录</p>' +
                '</div>' +
                '<div id="registerBtn" class="operaButton">' +
                '<p>注册</p>' +
                '</div>'
            )
            $("#loginBtn").click(function () {
                window.open("login.html");
            })
            $("#registerBtn").click(function () {
                window.open("register.html");
            })
        }
    })
</script>
</html>